﻿<ul id="userMenu">
    <li class="toContent"><a href="#content" accesskey="1">@T("Go to content")</a></li>
	@if (User == null)
	{
		if (Config.AuthenticationProviders.Facebook.IsDefined)
        {
		<li class="login facebook">@Html.Partial("ButtonFacebook", new{size="small"}, true)</li>
        }
		if (Config.AuthenticationProviders.Twitter.IsDefined)
		{
		<li class="login twitter">@Html.Partial("ButtonTwitter", new{size="small"}, true)</li>
		}
		if (Config.AuthenticationProviders.FormsAuth.IsDefined || Config.AuthenticationProviders.SSOOpenId.IsDefined)
		{
		<li class="login">@Html.ActionLinkLocalized("Sign In", "Login", "Authentication", new{returnUrl = ViewBag.ReturnUrl ?? Request.Url.PathAndQuery}, null)</li>
		}
    }
    else
	{
		if (this.User.HasModeratorPriviledges)
		{
			<li class="admin">@Html.ActionLinkLocalized("Admin dashboard", "Dashboard", "Admin")</li>
		}		
		<li class="userName">@Html.ActionLink(this.User.UserName, "Detail", "Users", new { id = User.Id }, null)</li>
		<li class="logged">@Html.ActionLinkLocalized("Account", "Edit", "Users", new { id = User.Id }, null)</li>
		<li class="logout">@Html.ActionLinkLocalized("Logout", "Logout", "Authentication")</li>
	}
</ul>
